﻿#region Header

/*
Behavioral Rating of Dancing Human Crowds based on Motion Patterns
By

Pascal Hauser 
Dipl. Ing. in Informatik, Hochschule für Technik Rapperswil, 2006
Master Thesis, Hochschule für Technik Rapperswil, 2008-2010

and

Raphael Gfeller
Dipl. Ing. in Informatik, Hochschule für Technik Rapperswil, 2006
Master Thesis, Hochschule für Technik Rapperswil, 2008-2010

*/

#endregion

#region Usings

using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using Emgu.CV;
using Emgu.CV.Structure;

#endregion

namespace paravili.Services {
	/// <summary>
	/// is responsible for retrieving a stored image 
	/// </summary>
	public interface IImageLocatorService {
		#region Public Properties

		ObservableCollection<ImageEntry> Images { get; }

		#endregion

		#region Public Methods

		Image<Lab, Byte> GetImage(string id);

		#endregion
	}

	/// <summary>
	/// dataformat used for retrieving images
	/// </summary>
	public class ImageEntry : INotifyPropertyChanged {
		#region Public Properties

		public string Id { get; set; }
		public Image<Lab, Byte> ImageData { get; set; }

		#endregion

		#region INotifyPropertyChanged Members

		public event PropertyChangedEventHandler PropertyChanged;

		#endregion

		#region Public Methods

		public void Refresh() {
			if (PropertyChanged != null) {
				PropertyChanged(this, new PropertyChangedEventArgs("ImageData"));
			}
		}

		#endregion
	}
}